/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package do_.com.bpd.business.referrals.persistence.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Administrator
 */
@Entity
@Table(name = "business_case_file", catalog = "referrer_system", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "BusinessCaseFile.findAll", query = "SELECT b FROM BusinessCaseFile b"),
    @NamedQuery(name = "BusinessCaseFile.findById", query = "SELECT b FROM BusinessCaseFile b WHERE b.id = :id"),
    @NamedQuery(name = "BusinessCaseFile.findByFileName", query = "SELECT b FROM BusinessCaseFile b WHERE b.fileName = :fileName"),
    @NamedQuery(name = "BusinessCaseFile.findByFileDate", query = "SELECT b FROM BusinessCaseFile b WHERE b.fileDate = :fileDate"),
    @NamedQuery(name = "BusinessCaseFile.findByReadDone", query = "SELECT b FROM BusinessCaseFile b WHERE b.readDone = :readDone")})
public class BusinessCaseFile implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "id", nullable = false)
    private Integer id;
    @Size(max = 255)
    @Column(name = "file_name", length = 255)
    private String fileName;
    @Column(name = "file_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fileDate;
    @Column(name = "read_done")
    private Boolean readDone;

    public BusinessCaseFile() {
    }

    public BusinessCaseFile(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public Date getFileDate() {
        return fileDate;
    }

    public void setFileDate(Date fileDate) {
        this.fileDate = fileDate;
    }

    public Boolean getReadDone() {
        return readDone;
    }

    public void setReadDone(Boolean readDone) {
        this.readDone = readDone;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BusinessCaseFile)) {
            return false;
        }
        BusinessCaseFile other = (BusinessCaseFile) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "do_.com.bpd.business.referrals.persistence.entities.BusinessCaseFile[ id=" + id + " ]";
    }
    
}
